<template xmlns:v-lazy="http://www.w3.org/1999/xhtml">
  <w-cell00
    :icon="icon"
    @cellClick="cellClick"
    :title="title"
    :describe="describe"
    :detail="detail"
    :hover="hover"
    :link="link"
    :operation-width="operation ? 130 : 0">
    <el-button
      type="primary"
      size="mini"
      class="el-icon-edit"
      @click.stop="editBtnClick"/>
    <el-button
      type="danger"
      size="mini"
      class="el-icon-delete"
      @click.stop="detailBtnClick"/>
  </w-cell00>
</template>

<script>
  import WCell00 from '../cell_00/index'

  export default {
    name: 'AdminComCell01',
    components: {
      WCell00
    },
    props: {
      hover: {
        type: Boolean,
        default: true
      },
      /**
       * 左侧图片
       */
      icon: {
        type: String,
        default: ''
      },
      /**
       * 标题
       */
      title: {
        type: String,
        default: ''
      },
      /**
       * 点击标题调换的url
       */
      link: {
        type: String,
        default: ''
      },
      /**
       * 描述
       */
      describe: {
        type: String,
        default: ''
      },
      /**
       * 详情
       */
      detail: {
        type: String,
        default: ''
      },
      /**
       * 是否显示右侧操作
       */
      operation: {
        type: Boolean,
        default: false
      }
    },
    methods: {
      /**
       * cell 点击
       */
      cellClick() {
        this.$emit ('cellClick')
      },
      /**
       * 编辑按钮点击
       */
      editBtnClick() {
        this.$emit ('editClick')
      },
      /**
       * 删除按钮点击
       */
      detailBtnClick() {
        this.$emit ('removeClick')
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>
